[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
VS_Use() Opens a file on a local area network CHG
Description:
VS_Use() opens a specified database file in the currently selected
work area or notifies the user if unsuccessful. The file can have an
ALIAS specified as well as EXCLUSIVE use set on or off.
Syntax:
l_Success = VS_Use( c_DbfName, [l_Exclusive] , [c_Alias] , [l_NewArea]
, [l_ReadOnly] )
Pass:
c_DbfName is a character expression representing the name of the
DBF file to open. You should not include the file extension (i.e.
".DBF")
l_Exclusive is an optional logical expression that should be set
to .T. if you want to open c_DbfName in EXCLUSIVE mode, otherwise
.F. If omitted, l_Exclusive defaults to .F.
c_Alias is an optional character expression that contains the
alias name for c_DbfName. If omitted, c_Alias defaults to the
same value as c_DbfName.
l_NewArea is an optional logical expression that should be set to
.T. if you want VS_Use() to select the first non-used work area. The
default is .F.
l_ReadOnly is an optional logical expression that should be set to
.T. if you want to open c_DbfName in "read-only" mode.
Return:
l_Success is a logical expression that will be set to .T. if
successful, otherwise .F.
Notes:
Example:
DO WHILE whatever
IF .NOT. VS_USE("testfile",.F.)
ac_msg[1] = "Unable to open file"
ac_msg[2] = "Operation aborted"
VS_MSG(ac_msg,2,"","")
INKEY(5)
EXIT
ENDIF
.
.
.
ENDDO
Usage:
VS_Use() will attempt to open the specified database file in the
requested mode. If it is unsuccessful, a non-screen destructive
message stating, "Waiting for busy network. Press any key to abort."
will appear on the screen and VS_Use() will continue attempting to
open the file in the mode specified. If the user aborts the operation
by pressing a key, VS_Use() will return a logical value of false. If
VS_Use() returns a value of false, it is your job as the programmer to
abort the operation and recover properly.
See Also:
VS_FakeLck
VS_Append()
VS_FLock()
VS_RLock()
VS_AddRec()
VS_DelRec()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson